package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(100);"`
	Password string `gorm:"type:varchar(100);"`
	Emali    string `gorm:"type:varchar(100);"`
	Tel      string `gorm:"type:varchar(100);"`
}
type Good struct {
	gorm.Model
	Name   string  `gorm:"type:varchar(100);"`
	Price  float64 `gorm:"type:decimal(10,2)"`
	Status int     `gorm:"type:int"`
	Stock  int     `gorm:"type:int"`
	Img    string  `gorm:"type:varchar(100);"`
}
type Order struct {
	gorm.Model
	Name     string  `gorm:"type:varchar(100);"`
	Price    float64 `gorm:"type:decimal(10,2)"`
	Content  string  `gorm:"type:varchar(100);"`
	Quantidy string  `gorm:"type:varchar(100);"`
	SubTotal float64 `gorm:"type:decimal(10,2)"`
}
type OrderItem struct {
	gorm.Model
	UserID     int     `gorm:"type:int"`
	OrderID    int     `gorm:"type:int"`
	GoodName   string  `gorm:"type:varchar(100);"`
	GoodPrice  float64 `gorm:"type:decimal(10,2)"`
	GoodStatus int     `gorm:"type:int"`
	Total      float64 `gorm:"type:decimal(10,2)"`
}
